Skip to content

ci: restrict ci workflow permissions to read-only#86

Open
arpitjain099 wants to merge 1 commit into
solidjs:mainfrom
arpitjain099:chore/workflow-permissions
Open

ci: restrict ci workflow permissions to read-only#86
arpitjain099 wants to merge 1 commit into
solidjs:mainfrom
arpitjain099:chore/workflow-permissions

Conversation

@arpitjain099
Copy link
Copy Markdown

Small hardening change: set permissions: contents: read at the top of .github/workflows/ci.yml so the workflow token is read-only instead of inheriting the repository default. The job only does checkout and build/test, so nothing else is required.

Set an explicit least-privilege permissions block so the workflow GITHUB_TOKEN is scoped to contents: read instead of inheriting the repository default.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@lxsmnsyc
Copy link
Copy Markdown
Member

lxsmnsyc commented Jun 2, 2026

lgtm, no downsides?

@arpitjain099
Copy link
Copy Markdown
Author

Right, no downsides. The workflow only checks out the repo and runs the build, so its GITHUB_TOKEN never needs more than read. Declaring contents: read at the top just makes that explicit instead of letting the job inherit whatever the repository default grants (often read/write). If a future job in this file ever needs a write scope, it can be added at the job level without widening the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants